﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SMS
{
    public partial class uLichsutinnhan : UserControl
    {
        fLogin main;
        public uLichsutinnhan(fLogin main1)
        {
            InitializeComponent();
            main = main1;
        }

        public void uLichsutinnhan_Load(object sender, EventArgs e)
        {
            DataTable Data = new DataTable();
            Data = main.KetNoiDB.GetDataTable("SELECT HOTEN AS N'TÊN KHÁCH HÀNG', KH.CMND, "
            + "DTDIDONG AS N'SỐ ĐIỆN THOẠI', NOIDUNG AS N'NỘI DUNG TIN NHẮN', SOKHUNG N'SỐ KHUNG',  "
            + "LOAITN AS N'LOẠI TIN NHẮN', THOIGIANGUI AS N'GỬI LÚC', NK.TINHTRANG AS N'TÌNH TRẠNG GỬI'  "
            + "FROM NHATKITINNHAN NK, KHACHHANG KH WHERE NK.CMND = KH.CMND");

            dataGridView1.DataSource = Data;
        }




    }
}
